var app = getApp();
var util = require("../../utils/libs.js")
var api = require("../../utils/api.js")
Page({
  data: {
    assistList:{
    },
    id:null,
    is_draft:1
  },
  toSend () {
    wx.navigateTo({
      url: '/pages/sendTo/sendTo',
    })
  },
  onLoad (options) {
    let that = this
   that.setData({
     id:options.id
   })
   that.getassist()
    // 页面初始化 options为页面跳转所带来的参数
  },
  getassist(){
    let that =this
    util.request(api.articleDetail,{
     id:that.data.id
    },"GET")
    .then(function (res) {
      if(res.error_code === 0){
         that.setData({
          assistList:res.data.article,
          id:res.data.article.id
         })
      }
    })
  },
  sendTo(){
    let that = this
        wx.navigateTo({
          url: '/pages/assist/assist?id='+that.data.id
        })
  },
  toSend(){
    let that =this
    wx.navigateTo({
      url: '/pages/amended/amended?id='+that.data.id
    })  
  },
  onReady () {
    // 页面渲染完成
  },
  onShow (options) {
    // 页面显示
  },
  onHide () {
    // 页面隐藏

  },
  onUnload () {
    // 页面关闭

  }
})
